<template>
	<view class="">
		<data-list ref="list" :showEmptyBut="false" :enableBackToTop="true" @load="page">
			<uni-list>
				<uni-list-item showArrow :thumb="item.icon" :thumbSize="'lg'" :link="navigateTo"
					:to="'/pagesOne/helpDetail/helpDetail?id='+item.id" v-for="(item,index) in record" :index="index"
					:key="index" ellipsis="1" :title="item.title" />
			</uni-list>
		</data-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				record: [],
			}
		},
		onLoad(option) {},
		methods: {
			back() {
				uni.navigateBack()
			},
			// pageRefresh(data, callback) {
			// 	this.record = [];
			// 	this.page(data, callback)
			// },
			page(data, callback) {
				this.apis.helpList({
					pageNum: data.page,
					pageSize: data.size,
					type: 2,
				}).then(res => {
					this.record = [...this.record, ...res.records || []];
					callback({
						list: this.record,
						total: res.total || 0
					});
				})
			},
		}
	}
</script>

<style>

</style>
